package com.kcht.itsed.mws.alefacade.stdfacade;

import com.kcht.itsed.mws.alefacade.exceptions.DuplicateNameException;
import com.kcht.itsed.mws.alefacade.exceptions.InUseException;
import com.kcht.itsed.mws.alefacade.exceptions.NoSuchNameException;
import com.kcht.itsed.mws.alefacade.exceptions.ValidationException;
import com.kcht.itsed.mws.extendalemodel.HASpec;

import java.util.List;

/**
 * 扩展的ALE接口：高可用性规则
 * @author 张文硕
 *
 */
public interface ALEHA extends ALEIntf {
	
	void define(String specName, HASpec spec)throws DuplicateNameException,ValidationException;
	
	void undefine(String specName)throws NoSuchNameException, InUseException;
	
	void activeHASpec(String specName)throws NoSuchNameException, InUseException;
	
	void deactiveHASpec(String specName)throws NoSuchNameException;
	
	HASpec getHASpec(String specName)throws NoSuchNameException;
	
	List<String> getHASpecNames();
	
	void switchToMaster(String specName)throws NoSuchNameException,InUseException;
	
	void switchToBackup(String specName)throws NoSuchNameException,InUseException;
	
}
